package Thread;

import java.util.Scanner;

/**
 *
 */
public class ThreadSleep {
    public static void main(String[] args) {
        try{
            Scanner sc = new Scanner(System.in);
            System.out.println("输入倒计时时间:");
            int number = sc.nextInt();
            for (int i = number-1; i >=0; i--) {
                Thread.sleep(1000);
                System.out.println(i);
            }
            System.out.println("计时结束");
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
